package cn.kgc.dao.impl;

import cn.kgc.dao.BaseDao;
import cn.kgc.dao.NewsCategoryDao;
import cn.kgc.pojo.NewsCategory;

public class NewsCategoryDaoImpl extends BaseDao implements NewsCategoryDao{
	
	//删除某个新闻类别
	public boolean deleteNewsCategory(NewsCategory newsCategory) {
		boolean flag = false;
		String sql = "delete from news_category where id = ?";
		Object[] params = {newsCategory.getId()};
		int i = this.executeUpdate(sql, params);
		if(i>0){
			System.out.println("删除新闻类别成功！");
			flag = true;
		}
		this.closeResource();
		return flag;
	}
	
}
